﻿using System;
using System.IO;
using System.Reflection;
using System.ServiceModel.Syndication;
using System.Xml;

namespace DataProvidersUnitTest
{
    public static class MockDataProvider
    {
        private const string MockDataName = "MockNewsFeedData.xml";

        private const string CurrentNamespace = "DataProvidersUnitTest";

        public static SyndicationFeed MockNewsFeed { get; private set; }

        static MockDataProvider()
        {
            var _assembly = Assembly.GetExecutingAssembly();
            var mockDataStream = new StreamReader(
                _assembly.GetManifestResourceStream(string.Format("{0}.{1}",CurrentNamespace,MockDataName)));
            MockNewsFeed = SyndicationFeed.Load(XmlReader.Create(mockDataStream));
        }
    }
}
